

showTree=function(context) {
    window.colorfn = function () {
    };
    window.treeHeight = [];
    window.context = context;
    resultAjax(context.attr("url"), "", function (data, obj) {
        var json ={id:"terry li", name:"(General Manager)", data:{},children:[]};
        for(var k in data)
        {
            json.children.push(parseData(data[k]));
        }

        init(json);
    }, "json", context);
};;

parseData = function(obj)
{
    var json ={id:obj.NAME, name:obj.NAME, data:{},children:[]};
    for(var k in obj.children)
    {
        json.children.push(parseData(obj.children[k])) ;
    }
    return json;
};;